public class CloneTest implements Cloneable{
    String name;
    int age;

    @Override
    public String toString() {
        return "CloneTest{" +
                "name='" + name + '\'' +
                '}';
    }

    public CloneTest(String name) {
        this.name = name;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
